#pragma once
#include <atomic>
#include <cstdint>
#include <httplib.h>
#include <map>
#include "DeviceInterface.h"
#include "Network.h"
#include "pch.h"

class JinyiRsuClient : public DeviceInterface {

    struct RsuInfo {
        std::string Address;
        std::string DevID;
        std::string RsuID;
    };

public:
    virtual void Init(std::shared_ptr<DeviceInfo> info);
    virtual void Start();
    virtual void Stop();

private:
    httplib::Server _svr;
    std::shared_ptr<DeviceInfo> _device_info = nullptr;

    std::string _devID;
    std::string _rsuID;
    std::string _vendor;
    std::string _version;

    std::map<std::string, RsuInfo> _rsu_mapping;
};